package com.gxa.controller;

import com.gxa.common.R;
import com.gxa.service.EmpService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Author: wangyifan
 * @Date: 2021/11/29 18:33
 * @Description: $end$
 * @Version: V1.0
 */
@Controller
@Api(value = "用户数据测试",tags ="用户数据接口api" )
public class EmpController {

    @Autowired
    private EmpService empService;
    /**查询Emp*/
    @RequestMapping(value = "/queryEmp",method = RequestMethod.GET)
    @ApiOperation(value = "Emp查询接口",notes = "查询Emp",httpMethod = "get")
    @ApiImplicitParam(name = "page",value = "当前页",required = true,dataType = "String",paramType = "query")
    @ResponseBody
    public R queryEmp(@RequestParam(name = "page",defaultValue = "1") Integer currentPage,@RequestParam(defaultValue = "10") Integer PageSize){
        R r = empService.queryEmp(currentPage,PageSize);
        return r;
    }

}
